{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "### XXX This is probably to remove"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "sl_2014 = []\n",
    "drc_2007 = []\n",
    "for seq in ebola_seqs.taxon_set:\n",
    "    if seq.label.startswith('EBOV_2014') and len(sl_2014) < 8:\n",
    "        sl_2014.append(ebola_seqs[seq])\n",
    "    elif seq.label.startswith('EBOV_2007'):\n",
    "        drc_2007.append(ebola_seqs[seq])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "print(len(sl_2014))\n",
    "print(len(drc_2007))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "pair_stats = popgenstat.PopulationPairSummaryStatistics(sl_2014, drc_2007)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "print('Average number of pairwise differences (total): %s' %\n",
    "      pair_stats.average_number_of_pairwise_differences)\n",
    "print('Average number of pairwise differences between populations: %s' %\n",
    "      pair_stats.average_number_of_pairwise_differences_between)\n",
    "print('Average number of pairwise differences within populations: %s' %\n",
    "      pair_stats.average_number_of_pairwise_differences_within)\n",
    "print('Average number of new pairwise differences : %s' %\n",
    "      pair_stats.average_number_of_pairwise_differences_net)\n",
    "print('Number of segregating sites: %s' %\n",
    "      pair_stats.num_segregating_sites)\n",
    "print(\"Watterson's theta: %s\" %\n",
    "      pair_stats.wattersons_theta)\n",
    "print(\"Wakeley's Psi: %s\" % pair_stats.wakeleys_psi)\n",
    "print(\"Tajima's D: %s\" % pair_stats.tajimas_d)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
